package com.whj.apiboss.service.impl;

import com.whj.apiboss.remote.ServiceDriverClient;
import com.whj.apiboss.service.DriverUserService;
import com.whj.internalcommon.dto.DriverUser;
import com.whj.internalcommon.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Auther: wanghaijun
 * @Date: 2023/1/12 - 01 - 12 - 12:35 
 * @Description: com.whj.apiboss.service.impl
 */

@Service
public class DriverUserControllerImpl implements DriverUserService {

    @Autowired
    private ServiceDriverClient serviceDriverClient;

    /**
     * 调用service-driver-user服务实现对司机信息的添加
     * @param driverUser
     * @return
     */
    @Override
    public ResponseResult addDriverUser(DriverUser driverUser) {
        ResponseResult responseResult = serviceDriverClient.addDriverUser(driverUser);
        return responseResult;
    }

    /**
     * 调用service-driver-user服务实现对司机信息的修改
     * @param driverUser
     * @return
     */
    @Override
    public ResponseResult updateDriverUser(DriverUser driverUser) {
        ResponseResult responseResult = serviceDriverClient.updateDriverUser(driverUser);
        return responseResult;
    }
}
